package mil.af.amc.adpetracker.web.actions.struts1.DrmoPackage;

import mil.af.amc.adpetracker.web.actions.struts1.AbstractAction;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.DynaActionForm;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Select The Organization To Display on the View DRMO Packages index page
 *
 * @author TSgt Jason Ferguson
 */

public class DrmoPackageSelectAccountAction extends AbstractAction {

    @Override
    public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {

        DynaActionForm form = (DynaActionForm) actionForm;
        int accountId = (Integer) form.get("accountId");

        httpServletRequest.setAttribute("accountId", accountId);

        return actionMapping.getInputForward();

    }
}
